package geektime.spring.springbucks.service;

import geektime.spring.springbucks.model.Coffee;
import geektime.spring.springbucks.repository.CoffeeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CoffeeServiceImpl implements CoffeeService{
    @Autowired
    private CoffeeRepository coffeeRepository;
    @Override
    public List<Coffee> findByNameInOrderById(List<String> list) {
        return coffeeRepository.findByNameInOrderById(list);
    }

    @Override
    public Coffee findByName(String name) {
        return coffeeRepository.findByName(name);
    }

    @Override
    public List<Coffee> findAll() {
        return coffeeRepository.findAll();
    }
}
